Autofocus mechanisms for cameras are well known. Such autofocus mechanisms typically move one or more lenses of a camera so as to achieve desired sharpness or focus of an image. Autofocus mechanisms can be either active or passive. Active autofocus mechanisms determine a distance to the subject and then move one or more lenses to a position that has been determined to provide proper focus for that distance. Passive autofocus mechanisms determine the sharpness of images as the focusing lens(es) are moved, so as to determine the particular position where the best focus is obtained.
The distance to the subject can be determined by measuring the time that it takes for a signal, such as infrared light or ultra high frequency sound, to travel to the subject and bounce back to the camera. Triangulation or the amount of light reflected by a scene can also be used to determine distance.
Sharpness of the image can be determined by computer analysis. The lens or lenses are moved while the computer measures the sharpness of each image produced during the movement. The sharpest image can be considered to be the best focused imaged.
To determine sharpness, the computer can look at the difference in intensity between adjacent pixels of an imaging sensor. This can be the same imaging sensor that is used for taking a photograph or can be a different imaging sensor. The frame that provides maximum intensity difference, at least for some portion of the image, is considered to be the best focus.
With either active or passive focusing, a selected portion of the image can be used to determine focus. For example, when a person is being photographed, the person is generally centered in the image. Thus, using the central portion of the image tends to result in the most desirable focus.
Although such autofocus mechanisms have proven generally suitable for their intended purpose, they do possess inherent deficiencies that tend to detract from their overall desirability. For example, contemporary passive autofocus mechanisms typically require that a substantial number of focusing lens positions be tested to determine the best focus.
According to contemporary practice, lens positions can be tested to determine the best focus using either a fixed searching sequence or local searching. In a fixed searching sequence, a number of pre-determined focusing lens locations are tested to determine the best focus. For example, a full scan can involve testing 15 or more focusing lens positions.
When using local searching, a plurality of locations close to one another are searched. The search continues until a local maximum in sharpness is found. The local maximum is chosen as the best focus.
When using fixed searching, the testing of a comparatively large number, e.g. 15 or more, of focusing lens positions makes the autofocusing process take longer than desired. When only using local searching, the presence of a local sharpness maximum that is not the highest sharpness maximum can result in sub-optimal focus.
In view of the foregoing, it is desirable to provide autofocusing that tends to reduce the number of focusing lens positions that are tested and that tends to mitigate the likelihood of sub-optimal focus due to the presence of local sharpness maxima.